//Copyright © 2012 Ryan Larson, Ben Glasser
//[This program is licensed under the "GPL v3.0 License"]
// Please see the file COPYING in the source
//distribution of this software for license terms.

package org.app_chat.api;

import com.google.protobuf.Message;

/**
 * Created by Ryan of app-chat.org
 * on: 7/7/12 at 3:49 PM
 */

/**
 * Fancy Java Generics here with multiple bounded type parameters.
 * This will allow the user to implement the interface with any
 * {@link com.google.protobuf.GeneratedMessage}
 * <p/>
 *
 * @see <a href="docs.oracle/javase/tutorial/java/generics">Java Generics</a>
 */
public interface Listener<T extends Message> {

    /**
     * Method to handle the incoming {@link Message}
     * 
     * @param message the message being received
     */
    public void messageReceived(T message);

    /**
     * The default queue name
     * 
     * @return  The default queue name for the message
     */
    public String getQueueName();
}